package com.mmall.dao;

import com.mmall.pojo.Cart;
import com.mmall.vo.CartItemProductVo;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface CartMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    Cart selectByUserProduct(@RequestParam("productId") Integer productId, @RequestParam("userId") Integer userId);

    List<CartItemProductVo> selectCartProductVoListByUser(Integer userId);

    int deleteByUserIdProductIds(@RequestParam("productIdList") List productIds, @RequestParam("userId") Integer userId);
}